package com.dayuanit.atm.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;

@Configuration
@ComponentScan("com.dayuanit.atm.config.domain")
public class SpringConfig {

    @Bean
    public Person person(Dog dog) {
        Person person = new Person();
        person.setAge(10);
        person.setUsrename("tom");
//        person.setDog(dog());
        person.setDog(dog);
        return person;
    }

    @Bean
    public Dog dog() {
        return new Dog();
    }



}
